﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Gezel.Model;

#endregion

namespace Weazel.Gezel.Simulator.Reference
{
  /// <summary>
  /// This exception is thrown then the name of an
  /// ipblock type is not known to the simulation engine.
  /// </summary>
  public class UnknownIpBlockException : ApplicationException
  {
    /// <summary>
    /// The ipblock model object which
    /// contains the unknown iptype name.
    /// </summary>
    private readonly IPBlock ipBlock;

    public UnknownIpBlockException(IPBlock block)
    {
      this.ipBlock = block;
    }

    public override string Message
    {
      get { 
        return string.Format(
          "Unknown iptype '{0}' specified by ipblock '{1}'", 
          ipBlock.IpType, 
          ipBlock.Name
        );
      }
    }
  }
}
